package com.jiwei.community.exception;


import com.jiwei.community.enums.AppHttpCodeEnum;

/**
 * @Author 季伟
 * 功能：
 */
public class SystemException extends RuntimeException{
    private int code;

    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public SystemException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }

    public SystemException(AppHttpCodeEnum httpCodeEnum, String msg) {
        super(msg);
        this.code =  httpCodeEnum.getCode();
        this.msg = msg;
    }
}
